<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="layui/css/layui.css">
    <title>Title</title>
</head>
<body>




<table id="demo" lay-filter="test"></table>
<script src="layui/layui.js"></script>
<script>
    layui.use(['jquery','layer', 'form','element','table'], function(){
        var layer = layui.layer,
            element=layui.element,
            form = layui.form,
            table=layui.table,
            $=layui.jquery;
        var tableIns=table.render({
            elem:'#demo',
            /*title:'部门信息管理',*/
            url:'http://localhost:8080/position/selectAll',
            pages:false,
            cols:  [[ //标题栏
                {field: 'id', title: '职务编号'}
                ,{field: 'name', title: '职务名称'}
                ,{field: 'wages', title: '工资'}
            ]],
            parseData: function(res){ //res 即为原始返回的数据
                return {
                    "code": "0", //解析接口状态
                    "msg": "", //解析提示文本
                    "data": res //解析数据列表
                };
            }
        }

        );

    })
</script>
</body>
</html>